This invention relates to a program generation method, and more particularly to a program generation method suitable for utilizing a program generating program for producing, using a computer, a computation program for a computer numerical simulation model which simulates a physical phenomenon such as the potential distribution.
In numerical simulation using on a large-scale computer for analyzing numerically a physical phenomenon of a continuous system, a partial differential equation which represents the potential distribution, electromagnetic field, stress and strain field, etc. is segmented at numerous mesh points of coordinates placed in the region of analysis so that the equation is reduced to simultaneous linear equations or expressions of eigenvalue problems to be calculated using a computer. For the enhancement of the accuracy, stability and convergence of the numerical solution of equations or expressions, it is necessary to arrange mesh points smoothly, concentrate mesh points in regions with a great variation in the value of solution, express the shape of a boundary accurately, correct the calculation order, relative positions, etc. between adjacent mesh points, in the segmentation of coordicate mesh points.
In the conventional program generation method, as described in "Problem Solving Environments for Scientific Computing", pp. 147-162, Elsevier Science Publishers B.K. (North Holland), 1987, and Japanese Patent Unexamined Publication No. 60-140433, for example, information on the shape of a region where a phenomenon takes place and information on the equations of a simulation model which represent the calculation order, etc. of the phenomenon in the region are entered into the program generating program to produce a computation program. An invention derived from the improvement of this prior art is disclosed in the copending U.S. patent application Ser. No. 900,424 filed on Aug. 24, 1986, now U.S. Pat. No. 4,819,161, issued Apr. 4, 1989, which has been assigned to the assignee of the present invention. This is incorporated by reference. In the conventional method, the shape information and equation information necessary for program generation are all entered by the user initially. This operation is tedious in general, and it is very difficult in the case of a three-dimensional shape.
Next, an example of simulation will be explained. FIG. 1 shows an example of a simulation model, FIG. 2 shows an example of shape information of the simulation for the model shown in FIG. 1, and FIG. 3 shows an example of equation information of the simulation for the model shown in FIG. 1.
For example, as shown in FIG. 1, there is a device having a linear upper electrode 22 and a curved lower electrode 23 with a material having a dielectric constant of .epsilon. being filled between the electrodes. When a voltage of -50 kV is applied to the upper electrode 22 (made up of segments L2, L6 and L10 in the figure) and 0 volt is applied to the lower electrode (made up of L1, L5 and L8 in the figure), the interior potential distribution .PHI. is evaluated by solving the Laplace equation in the region 21 of FIG. 1. Namely, as shown by (1) in FIG. 1, with the potential .PHI. of the electrode L2+L6+L10 being set to -50,000 volts and the potential .PHI. of the electrode L1+L5+L8 being set to 0 volt, and with the potential (.PHI.) of L3+L9 being prevented from leaking in the normal direction, Laplace equation div(.epsilon..multidot.grad(.PHI.))=0 is solved for area S1+S2+S3 where area S1+S3 has a dielectric constant .epsilon. of 1 and area S2 has a dielectric constant of 2500.
In the conventional method, shape information for the region is given, as shown in FIG. 2, by defining characteristic points P1(x1, y1) and P2(x2, y2) 31 on the electrode line or on the boundary of dielectric constant, and subsequently defining curved segments (L1, L2, L3, ...) 32 with reference to these points, and defining closed planes (S1, S2, S3, ...) 33 which cover the region in concern with reference to these curved segments. Namely, L1 is defined to be a large arc (SPLINE) including P1-P4 which form the curved electrode 23, L2 is defined to be a straight line (LINE) including P6 and P7 which form the linear electrode 22, L3 is defined to be a straight line (LINE) including P1 and P7, and L4 is defined to be a curve (ARC) including P4, P5 and P6 which form an arc (ARC). S1 is defined to be a rectangle (QUAD) including L1-L4, S2 is defined to be a rectangle including L4-L7, and S3 is defined to be a rectangle including L7-L10. In numerical simulation, a continuous region is geometrically represented by a finite number of small areas (meshes) and nodes, and for this purpose division information 34 for these areas is specified. Namely, definition is made that L1 is divided by equal ratio division (R) into ten divisions with common ratio 0.9, L2 is divided by equal ratio division into ten divisions with common ratio 0.9, L3 is divided by even division into six divisions, and L4 is divided by even division into ten divisions.
Furthermore, the conventional method further specifies formula information of the simulation model defined in the region together with the above-mentioned shape information. Namely, as shown in FIG. 3, variables 41 defined in the region, physical constants 42 such as material coefficients, boundary conditions 43, an initial condition 44 which is necessary for a non-stationay problem, and the order of solving the partial differential equation are described as items 46 through 48. Here, VAR is a variable defining PHI (.PHI.), and CONST is a constant defining EPS (.epsilon.)=1 in S1+S3 and EPS (.epsilon.)=2500 in S2. BCOND is a boundary condition defining that PHI=-50,000 on L2+L6+L10, PHI=0 on L1+L5+L8, and PHI is no leakage in the normal direction on L3+L9. ICOND is an initial condition, SCHEME and END SCHEME indicate the beginning and end of computation, and SOLVE PHI OF DIV (ESP*GRAD (PHI))=0 directs to solve a partial differential equation div(.epsilon..multidot.grad(.PHI.))=0 for .PHI..
As described, conventionally, the setting of numerical information related to each part of a region, particularly such as the physical constants 42 and boundary conditions 43, is made by quoting the names (S1, S2, . . . , L1, L2, . . . , etc.) which were set in the definition of the shape information.
These are the summary of input information in the conventional program generation method described in the above-mentioned publication. Other methods include a method of information specifying-input for a program which generates a computation program, in which the shape information input process is defined using an interactive graphic processing system (CAD) or the like, and correspondence to the numerical information of the simulation model is made by specifying predetermined names or selecting (or picking up) portions of a shape displayed on a graphic display unit using an interactive input device such as a mouse.
As described, the conventional program generation method determines correspondence between the shape information and numerical information of a simulation model entirely by specifying the names of shape parts or by selecting them using an interactive input device. Accordingly, in the case of an enormous increase in the shape information, it becomes difficult to have management and specification by name. Moreover, in the case of a three-dimensional region concerned, it is difficult to select (pick up) the region visually on the display screen. Namely, it is more difficult to make a selection in a three-dimensional region than doing in a two-dimensional region on the display screen. When a three-dimensional region is concerned, the quantity of shape information is enormous in general, making it extremely difficult to provide a specification by name. Consequently, the conventional method consumes significant labor in producing input data for simulation, and it has been requested to overcome the frequent occurrence of excessive or lacking information in input data.